package com.ltkj.shop.controller.mobile;

import com.ltkj.common.core.web.controller.BaseController;
import com.ltkj.common.core.web.page.TableDataInfo;
import com.ltkj.shop.domain.ShopRestMenuType;
import com.ltkj.shop.service.IShopRestMenuTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 移动端餐饮菜品类型Controller
 * 
 * @author xupf
 * @date 2023-10-07
 */
@Api(tags = "餐饮菜品类型移动端接口")
@RestController
@RequestMapping("/mobile/menuType")
public class ShopRestMenuTypeMobileController extends BaseController
{
    @Autowired
    private IShopRestMenuTypeService shopRestMenuTypeService;

    /**
     * 根据餐饮商户ID查询全部菜品类型
     */
    @ApiOperation("根据餐饮商户ID查询全部菜品类型")
    @GetMapping("/list/{restaurantId}")
    public TableDataInfo list(@PathVariable("restaurantId") Long restaurantId)
    {
        ShopRestMenuType shopRestMenuType = new ShopRestMenuType();
        shopRestMenuType.setRestaurantId(restaurantId);
        List<ShopRestMenuType> list = shopRestMenuTypeService.selectShopRestMenuTypeList(shopRestMenuType);
        return getDataTable(list);
    }
}
